/*
 * SPI_M.h
 *
 * Created: 20.02.2013 17:07:11
 *  Author: saenko
 */ 


#ifndef SPI_M_H_
#define SPI_M_H_

#define cbi(reg,bit)	reg &= ~(_BV(bit))
#define sbi(reg,bit)	reg |= (_BV(bit))

  void spi_write(unsigned char data);
  unsigned char spi_read_IRQ_status(void);
  unsigned char spi_write_reg(unsigned char reg, unsigned char data);
  unsigned char spi_read_reg(unsigned char data);
  
  unsigned char WriteSingle (unsigned char *pbuf, unsigned char lenght);
  
  void spi_send_pack(void);
void InitialSettings(void);


#endif /* SPI_M_H_ */